<template>
  <div>
    <a-table
      ref="table"
      size="middle"
      bordered
      rowKey="id"
       class="table_header_blue"
      :columns="columns"
      :dataSource="dataSource"
      :pagination="ipagination"
      :loading="loading"
      @change="handleTableChange"
    >
      <span slot="wtms" slot-scope="text">
        <a-tooltip placement="topLeft" overlayClassName="tooltipWidth">
          <template slot="title">
            <span>{{ text }}</span>
          </template>
          {{ text | ellipsis(35) }}
        </a-tooltip>
      </span>
      <span slot="dingxing" slot-scope="text">
        <j-ellipsis class="bgc_tooltip" :value="text" :length="20" />
      </span>
      <span slot="actionName"> 操作 </span>
      <span slot="action" slot-scope="text, record">
        <a v-if="stage !== '05010' && stage !== '05050'" @click="handleEdit(record, '问题整改')">编辑</a>
        <a-button v-else type="link" @click="handleCheck(record, '查看')">查看</a-button>
      </span>
    </a-table>
    <CheckAndEditModel ref="modalForm" :id="id" @ok="modalFormOk"></CheckAndEditModel>
  </div>
</template>

<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import CheckAndEditModel from './CheckAndEditModel'

import columns from './indexColumns'

export default {
  props: ['id', 'type', 'stage'],
  name: 'zgjl',
  components: {
    CheckAndEditModel,
  },
  mixins: [JeecgListMixin],
  data() {
    return {
      queryParam: {
        proId: this.id,
        stage: this.stage,
        typeId: this.type,
      },
      typeId: this.type,
      columns: columns(this),
      url: {
        list: '/sjxmzygl/sjWorkZtfaProblem/queryAuditProblem',
      },
    }
  },
  created() {},
  methods: {
    modalFormOk() {
      this.loadData()
    },
  },
}
</script>
<style lang="less" scoped>
@import '~@assets/less/tableTheme.less';
.ant-tooltip-inner {
  width: 900px !important;
  min-width: 500px !important;
}
</style>